<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="userList.title"/></title>
    <meta name="heading" content="<fmt:message key='userList.heading'/>"/>
    <meta name="menu" content="AdminMenu"/>
</head>

<c:set var="buttons">
    <input type="button" style="margin-right: 5px"
        onclick="location.href='<c:url value="/userform.html?method=Add&from=list"/>'"
        value="<fmt:message key="button.add"/>"/>

    <input type="button" onclick="location.href='<c:url value="/mainMenu.html"/>'"
        value="<fmt:message key="button.done"/>"/>
</c:set>

<c:out value="${buttons}" escapeXml="false" />

<display:table name="userList" cellspacing="0" cellpadding="0" requestURI="" 
    defaultsort="1" id="users" pagesize="20" class="table" export="false">
    <display:column property="username" escapeXml="true" sortable="true" titleKey="user.username" style="width: 25%"/>
    <display:column property="name" sortable="true" titleKey="activeUsers.fullName" style="width: 34%" media="html"/>
    <display:column property="login" sortable="true" titleKey="therapy.tdate" style="width: 25%" />
    <display:column sortable="false" titleKey="therapy.formula" style="width: 16%; padding-left: 15px">
        <a href="<c:url value="/patient.html?u=${users.id}&f=users"/>">
            <img src="<c:url value="/images/aquadot.jpg"/>"
                alt="<fmt:message key="therapy.new"/>" class="icon"/></a>
    </display:column>
    <display:column sortable="false" titleKey="button.edit" style="width: 16%; padding-left: 15px">
        <a href="<c:url value="/userform.html?id=${users.id}&from=list"/>">
            <img src="<c:url value="/images/square.gif"/>"
                alt="<fmt:message key="button.edit"/>" class="icon"/></a>
   </display:column>

    <display:setProperty name="paging.banner.item_name" value="user"/>
    <display:setProperty name="paging.banner.items_name" value="users"/>

</display:table>

<c:out value="${buttons}" escapeXml="false" />

<script type="text/javascript">
    highlightTableRows("users");
</script>
